# def stu_register(name,age,*args):
#     print (name,age,args)
#
# stu_register('alex',1,2,3,4,)

# def stu_register(name,age,**kwargs):
#     print (name,age,kwargs)
# stu_register('alex',d=1,a=2,b=3,c=4,age=1)

#匿名函数
# def cacl(n):
#     return n**n
# a=cacl(10)
# print(a)

# res = map(lambda x:x*2,[1,2,3,4,5])
# for i in res:
#     print(i)

#compile
# msg = 'hahaha'
# f = open('123.md','w')
# print(msg,'123123123',sep='|',end="",file=f)

#slice
a = range(20)
pattern = slice(3,8,2)   #截取第三到的第八个元素，步长是2
for i in a[pattern]:
    print(i)

